<?php
session_start();
header("content-type:text/html; charset=utf-8");
require_once("../../utils/conn.php");

//$photo = trim($_POST['photo']);
$content = trim($_POST['content']);
date_default_timezone_set("PRC");
$issueTime= date("Y-m-d H:i:s");

    $db = new mysql_db();
  //  $ins_weiBo="insert into weibo(content,authorId,photo,familyNum,issueTime) values('".$content."','".$_SESSION['user_n_current']."','".$photo."','".$_SESSION['family_current']."','".$issueTime."')";
    $ins_weiBo="insert into weibo(content,author,familyNum,issueTime) values('".$content."','".$_SESSION['user_n_current']."','".$_SESSION['family_current']."','".$issueTime."')";
    $issueWb_res=$db->query($ins_weiBo);
     if($issueWb_res<=0){
         echo ($db->createJson(false,"","system error"));
     }
     else{
            echo($db->createJson(true,"",""));
     }
?>